
public class ChunkElement {
	private long index = -1;
	private boolean sent = false;
	
	private byte[] chunk = new byte[1024]; //For keeping the chunk while downloading
	
	public ChunkElement(long index, boolean sent){
		this.index = index;
		this.sent = sent;
	}
	
	public ChunkElement(long index, boolean sent, byte[] chunk){
		this.index = index;
		this.sent = sent;
		this.chunk = chunk;
	}
	
	public ChunkElement(int index){
		this.index = index;
	}
	
	public boolean isSent(){
		return this.sent;
	}
	
	public long getIndex(){
		return this.index;
	}
	
	public void changeSent(){
		this.sent = true;
	}
	
	public void setChunk(byte[] chunk){
		this.chunk = chunk;
	}
	
	public byte[] getChunk()
	{
		return chunk;
	}
}
